#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<string>
#include<algorithm>
#include<map>
using namespace std;
map<string, int> mp;
map<string, int >mp1;
int main()
{
	int n;
	cin >> n;
	for(int i=1;i<=n;i++)
	{
		string s1;
		cin >> s1;
		mp[s1]++;
	}
	int m;
	cin >> m;
	double sum = 0;
	for(int i=1;i<=m;i++)
	{
		string s2;
		int x;
		cin >>s2>>x;
		sum += x;
		if (mp.find(s2) == mp.end())
		{
			mp1[s2] = x;
		}
	}
	sum =1.0*sum/m;
	int f = 1;
	for (auto v : mp1)
	{
		if (v.second > sum)
		{
			cout << v.first << endl;
			f = 0;
		}
	}
	if (f) cout << "Bing Mei You" << endl;
	mp.clear();
	mp1.clear();
	return 0;
}